<?php
/**
 * Created by PhpStorm.
 * Register: czm
 * Date: 2019-06-27
 * Time: 11:36
 */
namespace app\admin\controller;

use think\Controller;
use think\Db;

class Addres extends Controller
{
    public function addresList()
    {
        $list = Db::name('address')->order('id desc')->select();
        $this->assign('data',$list);
        return $this->fetch();
    }

    public function addresEdit()
    {
        return $this->fetch();
    }

    public function addresDel()
    {
        $id = $_POST['id'];
        $data = db('address')->where('id',$id)->delete($id);
        if($data){
            return show(200);
        }else{
            return show(403);
        }
    }
}